package com.example.htmlfx.controller;

import com.example.htmlfx.HtmlfxApplication;
import com.example.htmlfx.view.LoginFxmlView;
import de.felixroske.jfxsupport.FXMLController;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.Label;

import java.net.URL;
import java.util.ResourceBundle;

/**
 * 主页控制器
 *
 * @author gzkemays
 * @date 2021/8/3
 */
@FXMLController
public class IndexController implements Initializable {
  @FXML private Button btn;
  @FXML private Label label;
  private ResourceBundle resourceBundle;

  @Override
  public void initialize(URL location, ResourceBundle resources) {
    resourceBundle = resources;
  }

  public void btnLoginClick(ActionEvent actionEvent) {
    label.setText("hello world");
  }

  public void btnClick(ActionEvent actionEvent) {
    HtmlfxApplication.showView(LoginFxmlView.class);
  }
}
